home *** CD-ROM | disk | FTP | other *** search
- Path: dd.chalmers.se!news.chalmers.se!sunic!pipex!howland.reston.ans.net!math.ohio-state.edu!jussieu.fr!univ-lyon1.fr!swidir.switch.ch!scsing.switch.ch!news.dfn.de!rrz.uni-koeln.de!teralon!dino.dinoco.de!yaps.dinoco.de!arno
- From: arno@yaps.dinoco.de (Arno Eigenwillig)
- Message-ID: <710.ANN@yaps.dinoco.de>
- Date: Tue, 08 Feb 1994 15:44:25 +0100
- Organization: Yet Another Private Site in Meckenheim, Germany
- Newsgroups: comp.sys.amiga.programmer
- Reply-To: arno@yaps.dinoco.de (Arno Eigenwillig)
- Subject: Re: How to detatch from cli.
- References: <2ivot9$o3d@harbinger.cc.monash.edu.au>
- X-Newsreader: Ann 0.10
- Lines: 33
-
- Hi!
-
- In article <2ivot9$o3d@harbinger.cc.monash.edu.au>,
- ins557g@aurora.cc.monash.edu.au (Mark Brophy) writes:
-
- > can someone enlighten me on how to detatch from the cli
- > in a C program. At the moment I'm forkl() ing which
- > seems a little like overkill???
-
- 1. The first code hunk of your program should be a little assembler
- routine which backups the pointer to the next segment, zeroes the
- original pointer, creates a new process with the backuped pointer, and
- terminates.
-
- 2. Alternatively, it is said that zeroing the cli_Module field in the
- CommandLineInterface structure BCPL-pointed to by a CLI process' pr_CLI
- will prevent the DOS from unloading any of your code so that you may use
- a technique like described above to keep your whole program in memory,
- malking a HLL implementation of auto detaching easier.
-
- 3. Although Ralph Babel's excellent Amiga Guru Book documents both
- methods above, he suggests RUNning the program as the most compatible
- way, although having a program RUN itself implies just the overhead you
- wanted to avoid in the first place.
-
- Any comments welcome.
-
- -- __ __
- Arno Eigenwillig __/// arno@yaps.dinoco.de __/// FIDO-Net (untested)
- ++49-2225-5870 \XX/ ARNO@FUTURE.ZER.sub.org \XX/ 2:2402/330.99 2:2440/99
-
- Objects may be divided up in three categories: malfunctioning objects,
- objects getting broken and objects getting lost. [Russel Baker]
-